#pragma once

#include "glare.d3d11.Prerequisites.h"
#include "glare.d3d11.RenderTarget.Interface.h"
#include "glare.core.RenderWindow.h"

namespace Glare {

	class D3D11RenderWindow : public RenderWindow, public D3D11RenderTargetInterface
	{
	public : const static string OPTION_PRESENT_FLAGS;

	public : D3D11RenderWindow(D3D11Driver* driver, PlatformWindow* platform_window);
	public : virtual ~D3D11RenderWindow();

	protected : virtual void InitializeImpl();

	public : virtual void Present();

	protected : virtual void SetFullscreenImpl(const bool& fullscreen);

	protected : virtual void SetOptionImpl(const string& name, const string& value);

	public : virtual Interface* _GetInterface();
	public : virtual Driver* GetDriver() const;

	public : virtual ID3D11RenderTargetView* GetD3DRenderTargetView() const;

	private : uint _present_flags;

	private : D3D11Driver* _driver;
	private : IDXGISwapChain* _d3d_swapchain;
	private : ID3D11Texture2D* _d3d_backbuffer_texture;
	private : ID3D11RenderTargetView* _d3d_rendertarget_view;
	};
}